package cate.game.pvp.ladder.msg;

import cate.game.GameBody;
import cate.game.client.msg.ClientMsg;
import cate.game.client.msg.MsgConfig;
import cate.game.client.msg.MsgInputTemplate;
import cate.game.client.msg.id.MsgIdBLadder;
import cate.game.role.Role;

@ClientMsg(title = "天梯赛 扫荡 の 请求")
public class LadderMopReq extends MsgInputTemplate {

    @Override
    public MsgConfig conf() {
        return MsgIdBLadder.MOP_REQ;
    }

    @Override
    public void action(GameBody game, Role role) throws Exception {
        role.getPvp().ladder.challengeCheck();
        role.getPvp().ladder.mopDo();
        LadderMopResp resp = new LadderMopResp();
        resp.sendNow(role);
    }

}
